package com.bjpowernode.db.mapper;

import cn.hutool.core.date.DateTime;
import com.bjpowernode.db.domain.ProductInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lettuce.core.dynamic.annotation.Param;

import java.math.BigDecimal;
import java.util.List;

/**
* @author z'x'c
* @description 针对表【b_product_info(产品信息表)】的数据库操作Mapper
* @createDate 2023-07-21 21:29:51
* @Entity com.bjpowernode.db.domain.ProductInfo
*/
public interface ProductInfoMapper extends BaseMapper<ProductInfo> {


    //按照主键查询上锁.
    ProductInfo selectByIdForUpdate(Integer productId);


    //扣除产品剩余可投资金额
    int reduceLeftAvalableMoney(@Param("id") Integer productId, BigDecimal bidMoney);


    //查询满标的产品
    List<ProductInfo> selectManBiaoProductList(DateTime beginTime, DateTime endTime);
}




